package com.shop.user.feign.item;

import com.shop.common.model.param.item.ItemBaseInput;
import com.shop.common.model.param.item.ItemDetailsInput;
import com.shop.common.model.result.item.ItemBaseOutput;
import com.shop.common.model.result.item.ItemDetailsOutput;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

/**
 * @Description: 商品原子服务远程接口
 *
 * @author zhoulk
 * @date: 2019年04月01日  13:37
 */

@FeignClient(serviceId = "item")
public interface IItemAtomFeignClientSvc {

    @GetMapping(value = "/item/atom/itemBase/{itemId}", consumes = "application/json")
    ItemBaseOutput qryItemBase(@PathVariable(value = "itemId") Integer itemId);

    @GetMapping(value = "/item/atom/itemBase", consumes = "application/json")
    List<ItemBaseOutput> qryItemBaseList(@RequestBody ItemBaseInput itemBaseInput);

    @GetMapping(value = "/item/atom/itemDetails/{itemId}", consumes = "application/json")
    ItemDetailsOutput qryItemDetails(@PathVariable(value = "itemId") Integer itemId);

    @GetMapping(value = "/item/atom/itemDetails", consumes = "application/json")
    List<ItemDetailsOutput> qryItemDetailsList(@RequestBody ItemDetailsInput itemDetailsInput);

    @PutMapping(value = "/shopCarts", consumes = "application/json")
    String modShopCarts(@RequestBody Map<String, List<ItemDetailsInput>> inParam);
}
